﻿using System.Web.Mvc;

namespace MyLab.Web.Areas.WhereAreYou
{
    public class WhereAreYouAreaRegistration : AreaRegistration
    {
        public override string AreaName
        {
            get
            {
                return "WhereAreYou";
            }
        }

        public override void RegisterArea(AreaRegistrationContext context)
        {
            context.MapRoute(
                "Test",
                "WhereAreYou/test/{name}/{age}",
                new { controller = "Test", action = "ModelBinder", name = " ", age = 0 },
                new[] { "MyLab.WhereAreYou.Controllers" }
            );

            context.MapRoute(
                "WhereAreYou_default",
                "WhereAreYou/{controller}/{action}/{id}",
                new { controller = "Home", action = "Index", id = UrlParameter.Optional },
                new[] { "MyLab.WhereAreYou.Controllers" }
            );

            
        }
    }
}
